
package com.xuxk.project.oauth.bean;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * UserRole Base Java Bean, base class for the model, mapped directly to database table
 * 
 * Avoid changing this file if not necessary, will be overwritten. 
 * @author 橙云科技有限公司
 * 用户角色关系表
 */
public class UserRole  implements Serializable {

    protected Integer id;
	protected Integer uId;
	protected Integer rId;


	/**
	 * Default Empty Constructor for class UserRole
	 */
	public UserRole () {
		super();
	}
	
	/**
	 * Default Key Fields Constructor for class UserRole
	 */
	public UserRole (
		 Integer in_id
        ) {
		this.setId(in_id);
    }

    

	/**
	 * 	 * @return Integer
	 */
	public Integer getId() {
		return this.id;
	}
	
	/**
	 * Set the id
	 */	
	public void setId(Integer aValue) {
		this.id = aValue;
	}	

	/**
	 * 用户id	 * @return Integer
	 */
	public Integer getUId() {
		return this.uId;
	}
	
	/**
	 * Set the uId
	 */	
	public void setUId(Integer aValue) {
		this.uId = aValue;
	}	

	/**
	 * 角色id	 * @return Integer
	 */
	public Integer getRId() {
		return this.rId;
	}
	
	/**
	 * Set the rId
	 */	
	public void setRId(Integer aValue) {
		this.rId = aValue;
	}	

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	@Override
	public boolean equals(Object object) {
		if (!(object instanceof UserRole)) {
			return false;
		}
		UserRole rhs = (UserRole) object;
		return new EqualsBuilder()
				.append(this.id, rhs.id)
				.append(this.uId, rhs.uId)
				.append(this.rId, rhs.rId)
				.isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		return new HashCodeBuilder(-82280557, -700257973)
				.append(this.id) 
				.append(this.uId) 
				.append(this.rId) 
				.toHashCode();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return new ToStringBuilder(this)
				.append("id", this.id) 
				.append("uId", this.uId) 
				.append("rId", this.rId) 
				.toString();
	}

	/**
	 * Return the name of the first key column
	 */

}